import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/home'
import index from '@/views/home/index.vue'
import list from '@/views/home/list'
import login from '@/views/login'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',  // 父路由
      name: 'home',
      component: home,
      children:[
      	{
  	      path: '/',  // 子路由1
  	      name: 'index',
  	      component: index
  	    },
  	    {
  	      path: '/list',   // 子路由2
  	      name: 'list',
  	      component: list
  	    },
      ]
    },
    {
      path: '/login',  // 父路由
      name: 'login',
      component: login,
    },

  ],
  mode: 'history',
})
